package com.example.lenovo.appstore.activity;

import butterknife.Bind;
import butterknife.ButterKnife;

import android.os.Bundle;
import android.widget.EditText;
import android.widget.TextView;

import com.example.lenovo.appstore.R;
import com.example.lenovo.appstore.base.BaseActivity;
import com.example.lenovo.appstore.utils.AppContext;
import com.example.lenovo.appstore.utils.StatusBarUtil;
import com.example.lenovo.appstore.view.TitleBarView;

public class RegisterActivity extends BaseActivity {
    @Bind({R.id.registr_title})
    TitleBarView titleBarView;
    @Bind(R.id.registr_username)
    EditText registr_username;//用户名
    @Bind(R.id.registr_password)
    EditText registr_password;//密码
    @Bind(R.id.registr_code)
    EditText registr_code;//验证码
    @Bind(R.id.registr_getcode)
    TextView registr_getcode;//获取验证码

    @Bind(R.id.registr_comfirm_button)
    TextView registr_comfirm_button;//注册
    @Bind(R.id.gologin)
    TextView gologin;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register);
        ButterKnife.bind(this);
        initView();
    }

    @Override
    protected void initView() {
        registr_username.setHint(AppContext.getInstance().getResources().getString(R.string.input_userid));
        registr_password.setHint(AppContext.getInstance().getResources().getString(R.string.regist_inputPhone_cn));
        registr_code.setHint(AppContext.getInstance().getResources().getString(R.string.regist_inputMessageCode_cn));
        registr_getcode.setText(AppContext.getInstance().getResources().getString(R.string.getcode));
        registr_comfirm_button.setText(AppContext.getInstance().getResources().getString(R.string.zhuce_cn));
        gologin.setText(AppContext.getInstance().getResources().getString(R.string.go_login_cn));
        titleBarView.setTitle(AppContext.getInstance().getResources().getString(R.string.zhuce_cn));
        titleBarView.showBackButton(true);
        StatusBarUtil.setStatusBarLightMode(getWindow());
    }
}
